package zlx.springcloud.controller;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;

import javax.annotation.Resource;

@RestController
public class OderController {

    public static final String PAYMENT8006_URL="http://cloud-provider-Payment";

    @Resource
    private RestTemplate restTemplate;

    @GetMapping(value = "/consumer/payment/cs")
    public String getPayment8006() {
        String result = restTemplate.getForObject(PAYMENT8006_URL + "/payment/cs", String.class);
        return result;
    }
    @GetMapping(value = "/zlx")
    public String zlx() {

        return "大家伙";
    }
}